// 初级写法
function getServePrimary(status: number) {
  if (status === 0) {
    return "massage";
  } else if (status === 1) {
    return "SPA";
  } else if (status === 2) {
    return "HealthCare";
  }
}
const result1 = getServePrimary(0);
console.log(`我要去${result1}`);
//中级写法
const Statue = {
  MASSAGE: 0,
  SPA: 1,
  HealthCare: 2,
};
function getServeMiddle(status: any) {
  if (status === Statue.MASSAGE) {
    return "message";
  } else if (status === Statue.SPA) {
    return "spa";
  } else {
    return "HealthCare";
  }
}
const result2 = getServeMiddle(Statue.SPA);
console.log(`我要去${result2}`);
//高级写法  枚举
enum Status {
  MASSAGE, //0
  SPA, //1
  HealthCare, //2
}
function geyServeThird(status: any) {
  if (status === Status.MASSAGE) {
    return "message";
  } else if (status === Status.SPA) {
    return "spa";
  } else {
    return "HealthCare";
  }
}
const result3 = geyServeThird(Status.SPA);
console.log(`我要去${result3}`);

const result4 = geyServeThird(2);
console.log(`我要去${result4}`);
